/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO

Authors: Nitay Megides
		 Rachel Banino

Project: Exercise 1

Using: Hw1Types.h

Description:
A simple logger module that writes to a text file determined by the 
LoggerInitialize function
oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/

#ifndef LOGGER_H
#define LOGGER_H

#include <stdio.h>
#include "Hw1Types.h"

// The local log file pointer
FILE *loggerFile;


/**
 * Initializes the logger to writing its log to file filename
 */ 
FILE* LoggerInitialize(char* filename);

/**
 * Writes the string "message" to the log
 */ 
void LoggerWriteMessage(char* message);

/**
 * All the following function wrap LoggerWriteMessage - Each formats its 
 * parameters in accordance with the demands
 */ 
void LogBuyFromSupplier(char* productName, char* customerName, TMoney price);
void LogBuyFromSupplierFailure(char* productName, char* customerName, TMoney price);
void LogSellToCustomer(char* productName, char* customerName, TMoney price);
void LogSellToCustomerFailure(char* productName, char* customerName, TMoney price);
void LogAddInventoryFromFile(TProductID productID, TMoney price);
void LogCreateInventoryFile();


/**
 * Frees up the logger resources
 */ 
void LoggerCleanup();

#endif // LOGGER_H